The Raster Package Controls ('ropt') Resource
The raster package controls ('ropt'
) resource, of typegxRasterPackOptionsType
, is used to define how some forms of line feeding are performed on a raster device. This resource is optional.Figure 6-25 shows the structure of a raster package controls resource.
Figure 6-25 The raster package controls resource
The raster package controls resource contains the following elements:
Table 6-33 shows the constants that you can use to specify the number types used in defining line feeds in raster package controls resources.
- Start-page string ID. The ID of the wide string (
'wstr'
) resource that is used as the start-page sequence. Wide strings are strings that require a 16-bit, short integer value to define their length. The length value is stored in the first 2 bytes of the string.- Form-feed string ID. The ID of the wide string (
'wstr'
) resource that is used as the form-feed sequence.- Forward line-feed maximum value. The maximum amount of a forward line feed.
- Forward line-feed number type. The type of the number used to specify the forward line feed. Constants for the number types are shown in Table 6-33.
- Forward line-feed minimum width. The minimum width of the forward line feed.
- Forward line-feed pad character. The pad character used for the forward line feed.
- Forward line-feed prefix string. The prefix string used for the forward line feed.
- Forward line-feed postfix string. The postfix string used for the forward line feed.
- Reverse line-feed maximum value. The maximum amount of a reverse line feed.
- Reverse line-feed number type. The type of the number used to specify the reverse line feed. The possible values are shown in Table 6-33.
- Reverse line-feed minimum width. The minimum width of the reverse line feed.
- Reverse line-feed pad character. The pad character used for the reverse line feed.
- Reverse line-feed prefix string. The prefix string used for the reverse line feed.
- Reverse line-feed postfix string. The postfix string used for the reverse line feed.
The ID of a raster package controls resource must be the constant
gxRasterPackOptionsID
. Listing 6-23 shows an example of a raster package controls resource for the ImageWriter II printer driver.Listing 6-23 An example of a raster package controls resource
resource gxRasterPackOptionsType (gxRasterPackOptionsID, sysHeap, purgeable) { gxPrintingDriverBaseID, /* ID of start page wstr res */ gxPrintingDriverBaseID+10, /* ID of form-feed wstr res */ /* forward line-feed characteristics */ 98, /* max line-feed amount is 98 */ gxRasterNumToASCII, /* express line-feed as ASCII */ 2, /* minimum width is 2 */ "0", /* pad with zeros */ "\0X1BT", /* <esc>T is set line-feed size */ "\0X1Br\0X0A" /* <esc>r<lf> is direction reverse, line feed */ /* reverse line-feed characteristics */ 98, /* max line-feed amount is 98 */ gxRasterNumToASCII,/* express line-feed as ASCII */ 2, /* minimum width is 2 */ "0", /* pad with zeros */ "\0X1BT", /* <esc>T is set line-feed size */ "\0X1Br\0X0A" /* <esc>r<lf> is direction reverse, line feed */ }; resource 'wstr' (gxPrintingDriverBaseID, sysHeap, purgeable) { /* Start page string: unidirectional, 144 dpi == ESC 5A 0700 ESC>ESCp */ "\0X1BO" "\0X1B>" "\0X1Bp"}; resource 'wstr' (gxPrintingDriverBaseID+10, sysHeap,purgeable) { /* End-page string: a control-L for IW's form feed */ "\0X0C", };If you use the default implementation of theGXRasterLineFeed
orGXRasterPackageBitmap
messages, you must define a raster package controls ('ropt'
) resource. TheGXRasterLineFeed
andGXRasterPackageBitmap
messages are described in the chapter "Printing Messages" in this book.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help